--use database name
--go

--1/table CreditCard
insert into CreditCard([Code],[Money]) values('5101385022504098',25000)
insert into CreditCard([Code],[Money]) values('5379576900039885',20000)
insert into CreditCard([Code],[Money]) values('5570074062441963',125000)
insert into CreditCard([Code],[Money]) values('5570202807894424',200000)
insert into CreditCard([Code],[Money]) values('5101385022504011',25000)
insert into CreditCard([Code],[Money]) values('5379576900039812',20000)
insert into CreditCard([Code],[Money]) values('5570074062441913',12500)
insert into CreditCard([Code],[Money]) values('5570202807894414',200000)
insert into CreditCard([Code],[Money]) values('5101385022504015',25000)
insert into CreditCard([Code],[Money]) values('5379576900039816',20000)
insert into CreditCard([Code],[Money]) values('5570074062441917',125000)
insert into CreditCard([Code],[Money]) values('5570202807894418',2000000)
go

--2/table CreditCardLog           need more details
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5101385022504098','Init',25000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5379576900039885','Init',20000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5570074062441963','Init',125000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5570202807894424','Init',200000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5101385022504011','Init',25000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5379576900039812','Init',20000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5570074062441913','Init',12500,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5570202807894414','Init',200000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5101385022504015','Init',25000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5379576900039816','Init',20000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5570074062441917','Init',125000,'01/18/2012 00:00:00')
insert into CreditCardLog([CreditCard],[Action],[money],[created_date]) values('5570202807894418','Init',2000000,'01/18/2012 00:00:00')
go

--3/table Role
insert into [Role]([Name]) values('Admin')
insert into [Role]([Name]) values('Member')
insert into [Role]([Name]) values('Quest')
go

--4/table CustomerType
insert into CustomerType([Name]) values('adult passengers')
insert into CustomerType([Name]) values('children')
insert into CustomerType([Name]) values('senior citizens')
go

--5/table Class          
insert into Class(Name,PercentPrice) values('First class',1000)
insert into Class(Name,PercentPrice) values('Business class',500)
insert into Class(Name,PercentPrice) values('Club class',100)
insert into Class(Name,PercentPrice) values('Smoking',300)
go

--6/table Country
insert into Country(Name) values('Albania')
insert into Country(Name) values('Algeria')
insert into Country(Name) values('Argentina')
insert into Country(Name) values('Australia')
insert into Country(Name) values('Austria')
insert into Country(Name) values('Belgium')
insert into Country(Name) values('Brazil')
insert into Country(Name) values('Brunei')
insert into Country(Name) values('Bulgaria')
insert into Country(Name) values('Cambodia')
insert into Country(Name) values('Canada')
insert into Country(Name) values('China')
insert into Country(Name) values('Czech Republic')
insert into Country(Name) values('Croatia')
insert into Country(Name) values('Denmark')
insert into Country(Name) values('Egypt')
insert into Country(Name) values('Finland')
insert into Country(Name) values('France')
insert into Country(Name) values('Germany')
insert into Country(Name) values('Greece')
insert into Country(Name) values('Hong Kong')
insert into Country(Name) values('India')
insert into Country(Name) values('Indonesia')
insert into Country(Name) values('Italy')
insert into Country(Name) values('Japan')
insert into Country(Name) values('South Korea')
insert into Country(Name) values('Laos')
insert into Country(Name) values('Malaysia')
insert into Country(Name) values('Mexico')
insert into Country(Name) values('Netherlands')
insert into Country(Name) values('New Zealand')
insert into Country(Name) values('Norway')
insert into Country(Name) values('Peru')
insert into Country(Name) values('Philippines')
insert into Country(Name) values('Portugal')
insert into Country(Name) values('Russia')
insert into Country(Name) values('Singapore')
insert into Country(Name) values('Spain')
insert into Country(Name) values('Sweden')
insert into Country(Name) values('Switzerland')
insert into Country(Name) values('Thailand')
insert into Country(Name) values('Taiwan')
insert into Country(Name) values('Tunisia')
insert into Country(Name) values('Turkey')
insert into Country(Name) values('United Kingdom')
insert into Country(Name) values('Vietnam')
insert into Country(Name) values('United States of America')
insert into Country(Name) values('Luxembourg')
insert into Country(Name) values('Myanmar')
insert into Country(Name) values('United Arab Emirates')
go

--12/table Location
insert into Location(Name,CountryId) values('Ha Noi',46)
insert into Location(Name,CountryId) values('Thanh pho Ho Chi Minh',46)
insert into Location(Name,CountryId) values('Paris',18)
insert into Location(Name,CountryId) values('Roma',24)
insert into Location(Name,CountryId) values('Oslo',32)
insert into Location(Name,CountryId) values('Torino',24)
insert into Location(Name,CountryId) values('Da Nang',46)
insert into Location(Name,CountryId) values('Milan',24)
insert into Location(Name,CountryId) values('Manchester',45)
insert into Location(Name,CountryId) values('Liverpoor',45)
insert into Location(Name,CountryId) values('London',45)
insert into Location(Name,CountryId) values('Moscow',36)
insert into Location(Name,CountryId) values('Kiev',36)
insert into Location(Name,CountryId) values('Seoul',26)
insert into Location(Name,CountryId) values('Busan',26)
insert into Location(Name,CountryId) values('Kuala Lumpur',28)
insert into Location(Name,CountryId) values('Madrid',38)
insert into Location(Name,CountryId) values('Lyon',18)
insert into Location(Name,CountryId) values('Barcelona',38)
insert into Location(Name,CountryId) values('Ankara',44)
insert into Location(Name,CountryId) values('Sydney',4)
insert into Location(Name,CountryId) values('Amsterdam',30)
insert into Location(Name,CountryId) values('Singapore',37)
insert into Location(Name,CountryId) values('Hong Kong',21)
insert into Location(Name,CountryId) values('SiemRiep',10)
insert into Location(Name,CountryId) values('Sevilla',38)
insert into Location(Name,CountryId) values('Leeds',45)
insert into Location(Name,CountryId) values('Tokyo',25)
insert into Location(Name,CountryId) values('Saitama',25)
insert into Location(Name,CountryId) values('New York',47)
insert into Location(Name,CountryId) values('Berlin',19)
insert into Location(Name,CountryId) values('Palermo',24)
insert into Location(Name,CountryId) values('Toulouse',18)
insert into Location(Name,CountryId) values('Frankfurt',19)
insert into Location(Name,CountryId) values('Zaragoza',38)
insert into Location(Name,CountryId) values('Melbourne',4)
insert into Location(Name,CountryId) values('Brisbane',4)
insert into Location(Name,CountryId) values('Perth',4)
insert into Location(Name,CountryId) values('Adelaide',4)
insert into Location(Name,CountryId) values('Canberra',4)
insert into Location(Name,CountryId) values('Auckland',31)
insert into Location(Name,CountryId) values('Wellington',31)
insert into Location(Name,CountryId) values('Shanghai',12)
insert into Location(Name,CountryId) values('Beijing',12)
insert into Location(Name,CountryId) values('Manila',34)
go

--7/table PlaneType
insert into PlaneType(Name,Manufacture,TotalSeats) values('Airbus A320-200','Airbus',160)
insert into PlaneType(Name,Manufacture,TotalSeats) values('Airbus A321-231','Airbus',180)
insert into PlaneType(Name,Manufacture,TotalSeats) values('Airbus A330-200','Airbus',266)
insert into PlaneType(Name,Manufacture,TotalSeats) values('Airbus A330-300','Airbus',320)
insert into PlaneType(Name,Manufacture,TotalSeats) values('Airbus A380-800','Airbus',330)
insert into PlaneType(Name,Manufacture,TotalSeats) values('Boeing 777-200ER','Boeing',338)
insert into PlaneType(Name,Manufacture,TotalSeats) values('Boeing 787-900','Boeing',360)
go

--8/table Plane
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-A320-001',1,'01/01/2000')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-A321-001',2,'01/02/2006')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-A330-001',3,'01/03/2005')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-A330-300-001',4,'01/04/2010')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-A380-001',5,'01/05/2011')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-B777-001',6,'01/06/2011')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-B777-002',6,'01/07/2011')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-B787-001',7,'01/07/2011')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-B787-002',7,'01/07/2011')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-B787-003',7,'01/07/2011')
insert into Plane(Name,PlaneTypeId,ProducingTime) values('VN-B787-004',7,'01/07/2011')
go

--9/TABLE PlaneClassSeat
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(1,2,20)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(1,1,10)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(1,3,115)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(1,4,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(2,2,20)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(2,1,10)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(2,3,135)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(2,4,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(3,2,25)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(3,1,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(3,3,196)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(3,4,30)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(4,2,25)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(4,1,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(4,3,250)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(4,4,30)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(5,2,25)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(5,1,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(5,3,260)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(5,4,30)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(6,2,25)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(6,1,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(6,3,268)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(6,4,30)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(7,2,25)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(7,1,15)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(7,3,290)
insert into PlaneClassSeat(PlaneId,ClassId,NumberSeats) values(7,4,30)
go

insert into Member([RoleId],[UserName],[Password],[CreditCard],[Hash]) values(2,'binladen','binladen','5101385022504098','')
insert into Member([RoleId],[UserName],[Password],[CreditCard],[Hash]) values(2,'sa','sa','5570202807894418','')
insert into Member([RoleId],[UserName],[Password],[CreditCard],[Hash]) values(2,'tuan','tuan','5379576900039812','')
insert into Member([RoleId],[UserName],[Password],[CreditCard],[Hash]) values(2,'minh','minh','5570074062441917','')
insert into Member([RoleId],[UserName],[Password],[Hash]) values(3,'guest','guest','')
go

--10/table Customer
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(1,1,'osama','bin laden','123 Alqueda','0903113113','a@yahoo.com',1,65,2467,'123456789023')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(1,5,'mohamed','ali','123 Alqueda','0903113113','a@yahoo.com',1,65,267,'123456789024')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(2,5,'mustafa','alibaba','123 Alqueda','0903113113','a@yahoo.com',1,65,467,'123456789025')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(2,5,'barack','obama','123 Alqueda','0903113113','a@yahoo.com',1,65,246,'123456789026')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(3,5,'alesandro','nesta','123 Alqueda','0903113113','a@yahoo.com',1,65,24670,'123456789027')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(3,2,'nguyen tan','dung','123 Alqueda','0903113113','a@yahoo.com',1,65,24677,'123456789028')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(3,3,'calvin','diep','123 Alqueda','0903113113','a@yahoo.com',1,65,247,'123456789029')
insert into Customer(CustomerType,MemberId,FirstName,LastName,[Address],PhoneNumber,Email,Sex,Age,SkyMiles,Passport)
values(3,4,'kenny','minh','123 Alqueda','0903113113','a@yahoo.com',1,65,467,'123456789020')
go


--13/table Map              --more informations DKM
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(1,16,4500000,245)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(1,23,5500000,370)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(16,1,4700000,280)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(23,1,5700000,405)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(44,1,4400000,275)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(1,8,16500000,925)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(8,1,17000000,1025)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(8,30,8500000,455)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(30,8,9200000,505)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(30,18,9300000,530)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(18,23,15500000,985)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(1,2,2100000,125)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(2,1,2150000,135)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(2,23,2350000,150)
insert into Map(OriginalLocation,DestinationLocation,Duration,Distance) values(23,2,2250000,140)
go

--14/table Router
insert into Router(OriginalLocation,DestinationLocation) values(1,30)
insert into Router(OriginalLocation,DestinationLocation) values(30,1)
insert into Router(OriginalLocation,DestinationLocation) values(1,36)
insert into Router(OriginalLocation,DestinationLocation) values(36,1)
insert into Router(OriginalLocation,DestinationLocation) values(2,30)
insert into Router(OriginalLocation,DestinationLocation) values(30,2)
go

--15/Table Flight
insert into Flight(PlaneId,MapId,FlightCode,StandardPrice,DepartureTime) values(1,13,'VN001',850,'1/12/2012 06:00')
insert into Flight(PlaneId,MapId,FlightCode,StandardPrice,DepartureTime) values(2,12,'VN002',200,'1/12/2012 07:00')
insert into Flight(PlaneId,MapId,FlightCode,StandardPrice,DepartureTime) values(3,6,'VN003',900,'1/12/2012 09:00')
insert into Flight(PlaneId,MapId,FlightCode,StandardPrice,DepartureTime) values(4,8,'VN004',150,'1/12/2012 19:30')
go
--16/table Ticket

--17/table RouterDetail
--18/table RegisterRouter
--19/table FlightClassSeat